#include <stdio.h>

int num(int n){
    int a, b, c;
    a = n / 100;
    b = (n / 10) % 10;
    c = n % 10;
    
    if(n == a*a*a + b*b*b + c*c*c){
        return n;
    } else {
        return -1; // 返回一个不可能的值，表示不满足条件
    }
}

int main(){
    for(int i = 100; i <= 999; i++){
        int result = num(i);
        if(result != -1){
            printf("%d ", result);
        }
    }
    return 0;
}